﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Simulacion.NumberGenerator;
namespace Simulacion.Distributions
{
    /// <summary>
    ///  Generic class of the Uniform distribution.
    /// </summary>
    class Uniform
    {
        public static double fUniform(double a, double b)
        {
            return 1.0 / (b - a);
        }

        /// <summary>
        /// Gets the value using the Uniform distribution.
        /// </summary>
        /// <returns>The value of the distribution.</returns>
        public static double GetDistributionValue(double a, double b)
        {   
            return (a + (b - a) * Generator.NextNumber) / 7.0F;
        }
    }
}
